package com.huabo.system.service.impl;

import com.huabo.system.config.DateBaseConfig;
import com.huabo.system.mysql.mapper.TblAssessStaffMySqlMapper;
import com.huabo.system.oracle.mapper.TblAssessStaffMapper;
import com.huabo.system.service.TblAssessStaffService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

@Service
public class TblAssessStaffServiceImpl implements TblAssessStaffService {

    @Resource
    private TblAssessStaffMapper tblAssessStaffMapper;

    @Resource
    private TblAssessStaffMySqlMapper tblAssessStaffMySqlMapper;

    @Override
    public String getStatusByUserAsss(BigDecimal staffid, BigDecimal assid, BigDecimal orgid) {


        if (DateBaseConfig.DATABASETYPE.equals("Oracle")) {

            return tblAssessStaffMapper.getStatusByUserAsss(staffid, assid, orgid);
        } else {
            return tblAssessStaffMySqlMapper.getStatusByUserAsss(staffid, assid, orgid);


        }
    }
}
